package com.gang.mars.redisson.Thread;

public class Apple08Status {

    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(()->{

            for (int i = 0; i < 10; i++) {

                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

            System.out.println("/////////");
        });

        Thread.State state = thread.getState();
        System.out.println(state);

        thread.start();
        Thread.State stateStart = thread.getState();
        System.out.println(stateStart);

        while (state != Thread.State.TERMINATED){
            Thread.sleep(1000);
            state = thread.getState();
            System.out.println(state);
        }
    }
}
